# coding=utf-8
class SchoolMember:
    '''代表任何学校里的成员'''

    def __init__(self, name, age):
        self.name = name
        self.age = age
        print('(Initialized SchoolMember: {})'.format(self.name))

    def tell(self):
        '''告诉我有关细节'''
        print('Name: "{}" Age: "{}"'.format(self.name, self.age), end=" ")


class Teacher(SchoolMember):
    '''代表一位老师'''

    def __init__(self, name, age, salary):
        SchoolMember.__init__(self, name, age)
        self.salary = salary
        print('(Initialized Teacher: {})'.format(self.name))

    def tell(self):
        '''老师的信息'''
        SchoolMember.tell(self)
        print('Salary: "{:d}"'.format(self.salary))


class Student(SchoolMember):
    '''代表一位学生'''

    def __init__(self, name, age, marks):
        SchoolMember.__init__(self, name, age)
        self.marks = marks
        print('(Initialized Student: {})'.format(self.name))

    def tell(self):
        '''学生的信息'''
        # docString在代码中的访问方式
        # print(Student.__doc__+' '+Student.tell.__doc__)
        SchoolMember.tell(self)
        print('Marks: "{:d}"'.format(self.marks))


t = Teacher("Minghong Yu", 45, 3000000)
s = Student("Li lei", 20, 98)

#打印一行空白行
print()

members = [t, s]
for member in members:
    member.tell()
